Dan Winship [Tue, 2 Nov 2010 17:24:29 +0000 (13:24 -0400)]
StButton: fix hover and grab tracking
Use StWidget:track-hover rather than doing it ourselves. Don't assume
that hover is always TRUE after an enter_event or FALSE after a
leave_event, since we have a pointer grab and will be getting other
actors' events.
Don't ungrab the pointer when it leaves the button, since that
destroys the whole point of getting a grab in the first place.
Only consider the button to have been clicked when it has both grab
(meaning the mouse was pressed over the button) and hover (meaning the
mouse was released over the button).
Also remove the virtual pressed/released methods, which weren't being
used anyway.
Florian Müllner [Fri, 5 Nov 2010 17:48:04 +0000 (18:48 +0100)]
app-menu: Fix quit menu item
As popup menus now take focus for keyboard navigation, no application
is focused when activating the menu. Use the target application instead,
which keeps track of the application currently associated with the menu.
Jonathan Matthew [Sat, 30 Oct 2010 06:29:21 +0000 (16:29 +1000)]
MessageTray: only create icon buttons if specifically requested
Action names sometimes unintentionally overlap with icon names, so
we should only create icon buttons if the message tray source requests
it. For the notification daemon, this is done by setting the
'action-icons' hint on the notification.
The previous notification server capability used to advertise this
feature, "x-gnome-icon-buttons", has been removed in favour of the
new capability described in the notification spec, "action-icons".
Dan Winship [Mon, 1 Nov 2010 14:51:11 +0000 (10:51 -0400)]
gnome-shell.modules: add libcanberra
The volume status icon requires libcanberra; we could get by with
packages so far, but we will need a very very recent libcanberra soon
anyway, so just require that.
Owen W. Taylor [Sat, 30 Oct 2010 21:28:36 +0000 (17:28 -0400)]
Fix cursor image tracking on 64-bit systems
Like all X API, XFixesGetCursorImage returns arrays of 32-bit
quantities as arrays of long; on 64-bit systems we need to
convert to an array of 32-bit words before creating a texture
from the result.
Hellyna Ng [Sat, 30 Oct 2010 19:54:43 +0000 (03:54 +0800)]
Increase the timeout for hiding the tray if the mouse didn't move far from it
We shouldn't hide the tray as quickly if the user might have left it
unintentionally, such as when moving the mouse over to a different tray item or
using the scroll bar in the chat notification.
Dan Winship [Fri, 29 Oct 2010 18:54:53 +0000 (14:54 -0400)]
pushModal: clear focus after pushing a new level
This way the new modal level is independent of whatever may have been
happening before. Fixes a problem with status menus becoming active
again from inside the app switcher, etc.
Tray icons replaced by a shell version are automatically filtered
and never make to the tray container, but when removed by the client
we were still trying to remove them from the tray, causing a warning.
Dan Winship [Thu, 7 Oct 2010 18:15:51 +0000 (14:15 -0400)]
PopupMenu: redo keynav using St.FocusManager
Each menu is a focus manager group, but there is also some explicit
focus handling between non-hierarchically-related widgets. Eg, to move
between menus, or from a menubutton into its menu.
Dan Winship [Tue, 15 Jun 2010 16:11:39 +0000 (12:11 -0400)]
St: add keyboard focus navigation support
Add StWidget:can-focus, st_widget_navigate_focus(), and
st_container_get_focus_chain(), and implement as needed to allow
keyboard navigation of widgets.
Neil Roberts [Thu, 28 Oct 2010 20:51:13 +0000 (21:51 +0100)]
StThemeNode: Fix the confusion between border and background
In d66e7dd49 I got confused between border_texture and
background_texture. The background_texture was being created as normal
but in the one place that it gets drawn I accidentally made it use the
border_material instead. This patch makes it create a
background_material similar to the border_material and uses it to
paint.
Neil Roberts [Wed, 27 Oct 2010 16:41:20 +0000 (17:41 +0100)]
st-theme-node-drawing: Don't create lots of one-shot materials
A few places in st-theme-node-drawing create one-shot material, paint
with it and then free it. This is suboptimal with current Cogl because
it will end up compiling an ARBfp program just for that single paint
and then it will throw it away when the material is destroyed.
There is a new function in st-private.c called
_st_create_texture_material. This creates a simple material for a
texture based on a common parent material that points to a dummy
texture. Any materials created with this function are likely to be
able to share the same program unless the material is further modified
to contain a different number of layers. It would be possible to use
cogl_set_source_texture for this instead except that it's not possible
to modify the material's color in that case so we couldn't render the
texture with opacity.
The corner textures are now stored as a handle to a material that
references the texture rather than storing the texure directly. There
is also a separate border_material member which always points to
border_texture as the only layer.
Dan Winship [Wed, 20 Oct 2010 16:43:22 +0000 (12:43 -0400)]
statusMenu: show a radio button-style dot next to the presence status
Adding a "PopupMenuRadioButtonItem" wouldn't work well, because we'll
need radio-button indicators on multiple different styles of menu
item. Also, the current design draws the indicator in the menu item's
padding, so it's sort of special anyway. So just add support at the
BaseMenuItem level.
Also, redo the menu/menuitem padding so that all the horizontal
padding is in the menu item, or else the indicator dot will show up in
the wrong spot.
Dan Winship [Tue, 19 Oct 2010 16:04:58 +0000 (12:04 -0400)]
statusMenu: fix menu items to match latest mockups
Rename a few, and add Suspend and Restart, although currently they do
the same thing as Shut Down (ie, they bring up a dialog that lets you
do any of those three). This will be fixed later when we have the
in-shell modal dialogs for these features.
Dan Winship [Tue, 19 Oct 2010 15:59:23 +0000 (11:59 -0400)]
PopupImageMenuItem: always show icon, on the right, not the left
In the new mockups, the user menu icons are on the right, not the
left.
Also, get rid of the idea of optional icons; the design doesn't have
icons on those items, and there probably aren't going to be symbolic
versions of some of those icons anyway. So if the caller specifies
PopupImageMenuItem, then always show an icon, and just use regular
PopupMenuItems for the items that don't have icons in the current
design.
Plugging the GtkSocket icon can fail, in which case NaTrayManager emits
tray-icon-removed but the icon has never emitted plug-added, thus the
ShellTrayIcon has not been created. This results in various criticals
and exceptions in the tray-icon-removed handler.
Maxim Ermilov [Sun, 24 Oct 2010 01:45:54 +0000 (05:45 +0400)]
dnd: Handle destruction of drag actor during drag
The shell crashes if the drag actor is destroyed during the drag
operation. Cancel the drag gracefully in this case.
https://bugzilla.gnome.org/show_bug.cgi?id=620389
Owen W. Taylor [Tue, 19 Oct 2010 18:55:43 +0000 (14:55 -0400)]
Adapt to removal of Mutter namespace
MutterWindow and MutterPlugin have been renamed to MetaWindowActor
and MetaPlugin, mutter_plugin_list_windows() to
meta_plugin_list_window_actors(). Adapt to those changes.
_volumeChanged should not update the icon if the sink is muted.
Fixes the case when shell is started with a muted sink (_mutedChanged
is called before _volumeChanged).
Dan Winship [Sun, 26 Sep 2010 21:38:36 +0000 (17:38 -0400)]
StThemeNode: simplify use of get_color/get_double/get_length
Although within St itself there are situations where the semantics of
these functions (return TRUE or FALSE and return the actual value in
an out parameter) is useful, it's mostly just annoying at the
application level, where you generally know that the CSS property is
going to specified, and there is no especially sane fallback if it's
not.
So rename the current methods to lookup_color, lookup_double, and
lookup_length, and add new get_color, get_double, and get_length
methods that don't take an "inherit" parameter, and return their
values directly. (Well, except for get_color, due to the lack of (out
caller-allocates) in gjs.)
And update the code to use either the old or new methods as appropriate.
Colin Walters [Thu, 21 Oct 2010 14:50:30 +0000 (10:50 -0400)]
Use gjs-internals.pc
Gjs changed to separate the "basic" API from "embedder" API. Unfortunately
due to our use of the importer API and a few other bits, we need to use
the "module" one. In the future I plan to extend the core API to
support this use case.
Add volume control indicator which uses API from gnome-volume-control
to interact with PulseAudio and shows both input and output volumes.
Also adds a small wrapper around libcanberra in ShellGlobal, used by the
volume indicator to provide auditive feedback.
Shell implemented indicators got padding from default button style,
and also spacing from their container, so too much space was left
between them. This only became apparent when more than one was
implemented, though.
Ray Strode [Mon, 18 Oct 2010 15:45:34 +0000 (11:45 -0400)]
st-theme: ref items in custom stylesheets list
st-theme stores some loaded stylesheets in a custom
stylesheets list. When removing items from this list
it unrefs them, but when adding items to the list it
neglects to ref them. This means that under certain
circumstances the list will contain items that have
already been freed.
Florian Müllner [Fri, 15 Oct 2010 07:18:37 +0000 (09:18 +0200)]
st-drawing-area: Avoid unnecessary repaints
StDrawingArea uses the member variable needs_repaint to keep track
of whether it needs repainting. The variable is set to TRUE correctly,
e.g. on allocation or style changes - alas, it is never set to FALSE,
resulting in the area being repainted continuously.
Ray Strode [Thu, 14 Oct 2010 17:29:32 +0000 (13:29 -0400)]
gdm: mute debug messages
Since we're just using a cut-and-paste of gdm code there's a
slight impedance mismatch between how that code and the rest of
the shell manage debug messages. In GDM, they're out of sight by
default, but in gnome-shell they're visible and quite verbose.
This muddies up and masks the useful messages that other parts
of the code generate.
This commit just mutes the messages unconditionally by default,
since they aren't that useful anyway.
Dan Winship [Thu, 30 Sep 2010 20:56:50 +0000 (16:56 -0400)]
NotificationDaemon: don't destroy trayicons when dismissing their notifications
Tray icons control their own lifespan; they're not supposed to
disappear when you dismiss their notifications like non-trayicon
notification sources do.
Dan Winship [Thu, 30 Sep 2010 20:41:38 +0000 (16:41 -0400)]
MessageTray: untangle click notifications
Previously, when you clicked on a notification, it would call
this.source.clicked(), which would emit a 'clicked' signal on the
source, and then various other stuff would happen from there. This
used to make a little bit of sense, when clicking on a notification
was supposed to do the same thing as clicking on its source, but makes
less sense now, when clicking on the source itself *doesn't* call
source.clicked()...
Change it so that when you click on a notification, the notification
emits 'clicked' itself, and the source notices that and calls its
notificationClicked() method, and the various source subclasses do
what they need to do with that, and Source no longer has a clicked
method/signal.